﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace MyPublisher.Framework
{
    public class PackageSession
    {
        private Package Package { get; set; }
        private EntityFactory EntityFactory { get; set; }

        public PackageSession(EntityFactory factory,Package package)
        {
            this.EntityFactory = factory;
            this.Package = package;
        }

        public void Publish(PublishProvider provider)
        {
            Publishing publishing = provider.Publish(Package);
            this.EntityFactory.Publishings.Add(publishing);
        }
    }
}
